package routers

import (
	middelware "go_server/middelware/jwt"

	"github.com/gin-gonic/gin"
)

func SetupRouter() *gin.Engine {
	r := gin.Default()
	r.GET("/ping", func(c *gin.Context) {
		c.String(200, "连接成功")
	})
	initLoginRouter(r)
	r.Use(middelware.JWTAuth())
	initUserRouter(r)
	initVehicleInformationRouter(r)
	return r
}
